<admintpl file="header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<form class="well form-search" method="post" action="{:U('Coach/showcoach')}">
			教练姓名：
			<input type="text" name="coachname" style="width: 100px;" value="{$where.coachname}" > &nbsp; &nbsp;
			<input type="submit" class="btn btn-primary" value="搜索" />
			<a class="btn btn-danger" href="{:U('Coach/clear')}">清空</a>
		</form>
		<table  class="table table-hover table-bordered table-list">
			<tr>
				<th>教练id</th>
				<th>教练姓名</th>
				<th width='200px' >个人简介</th>
				<th>评分</th>
				<th>评价人数</th>
				<th>管理员操作</th>
			</tr>
			<volist name='msg' id='show'>
				<tr>
					<td>{$show['coachid']}</td>
					<td>{$show['coachname']}</td>
					<input style="display:none;" id='hide{$i}' value="{$show['description']}" />
					<td><span name="smeta.thumb">
							<button class="btn btn-primary btn-small" onClick="javascript:$('#h').css('display','block'); var a=$('#hide{$i}').val();$('#h2').text(a);" >查看详细</button>	
						</span></td>
					<td><script language='javascript'>
					var average={$show['score']}/{$show['total']};
					var result=parseFloat(average).toFixed(1);
					document.write(result);
					</script></td>
					<td>{$show['total']}</td>
					<!--pathinfo模式下的参数传递：控制器/方法/参数/参数的值-->
					<td><a class="btn btn-primary btn-small" href='index.php?m=Coach&a=editcoach&coachid={$show.coachid}'>修改</a>&nbsp;<a class="btn btn-primary btn-small" href='index.php?m=Coach&a=showjudge&coachid={$show.coachid}'>查看评论</a>&nbsp;<a class="btn btn-danger btn-small" href='index.php?m=Coach&a=delcoach&coachid={$show.coachid}'>删除</a></td>
				</tr>
			</volist>
		</table>
		<div class="pagination">{$page}</div>
	</div>
	<div id='h' class="alert alert-success" style="display:none;position:absolute;top:60%;left:50%;margin:-120px 0 0 -200px;z-index:2;radius:6px;width:400px;height:240px;">
		<button class="close" onClick="javascript:$('#h').css('display','none');">&times;</button>
		<div style="clear:both;"></div>
		<p id='h2'></p>
	</div>
<!--<tc_include file=":footer" />-->

</body>
</html>